package com.zjq.hibernate.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Log entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "log", catalog = "bank")
public class Log implements java.io.Serializable {

	// Fields

	private Integer logid;
	private User userByShoukuanid;
	private User userByFukuanid;
	private Float money;
	private Integer type;

	// Constructors

	/** default constructor */
	public Log() {
	}

	/** full constructor */
	public Log(User userByShoukuanid, User userByFukuanid, Float money,
			Integer type) {
		this.userByShoukuanid = userByShoukuanid;
		this.userByFukuanid = userByFukuanid;
		this.money = money;
		this.type = type;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "logid", unique = true, nullable = false)
	public Integer getLogid() {
		return this.logid;
	}

	public void setLogid(Integer logid) {
		this.logid = logid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "shoukuanid")
	public User getUserByShoukuanid() {
		return this.userByShoukuanid;
	}

	public void setUserByShoukuanid(User userByShoukuanid) {
		this.userByShoukuanid = userByShoukuanid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "fukuanid")
	public User getUserByFukuanid() {
		return this.userByFukuanid;
	}

	public void setUserByFukuanid(User userByFukuanid) {
		this.userByFukuanid = userByFukuanid;
	}

	@Column(name = "money", precision = 12, scale = 0)
	public Float getMoney() {
		return this.money;
	}

	public void setMoney(Float money) {
		this.money = money;
	}

	@Column(name = "type")
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

}